<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreatePagosTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreatePagosLabel_idPago}" for="idPago" />
                    <h:inputText id="idPago" value="#{pagosController.selected.idPago}" title="#{bundle.CreatePagosTitle_idPago}" required="true" requiredMessage="#{bundle.CreatePagosRequiredMessage_idPago}"/>
                    <h:outputLabel value="#{bundle.CreatePagosLabel_fecha}" for="fecha" />
                    <h:inputText id="fecha" value="#{pagosController.selected.fecha}" title="#{bundle.CreatePagosTitle_fecha}" required="true" requiredMessage="#{bundle.CreatePagosRequiredMessage_fecha}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreatePagosLabel_montoPagar}" for="montoPagar" />
                    <h:inputText id="montoPagar" value="#{pagosController.selected.montoPagar}" title="#{bundle.CreatePagosTitle_montoPagar}" required="true" requiredMessage="#{bundle.CreatePagosRequiredMessage_montoPagar}"/>
                    <h:outputLabel value="#{bundle.CreatePagosLabel_cuotasFaltantes}" for="cuotasFaltantes" />
                    <h:inputText id="cuotasFaltantes" value="#{pagosController.selected.cuotasFaltantes}" title="#{bundle.CreatePagosTitle_cuotasFaltantes}" required="true" requiredMessage="#{bundle.CreatePagosRequiredMessage_cuotasFaltantes}"/>
                    <h:outputLabel value="#{bundle.CreatePagosLabel_cuotasPagados}" for="cuotasPagados" />
                    <h:inputText id="cuotasPagados" value="#{pagosController.selected.cuotasPagados}" title="#{bundle.CreatePagosTitle_cuotasPagados}" required="true" requiredMessage="#{bundle.CreatePagosRequiredMessage_cuotasPagados}"/>
                    <h:outputLabel value="#{bundle.CreatePagosLabel_saldo}" for="saldo" />
                    <h:inputText id="saldo" value="#{pagosController.selected.saldo}" title="#{bundle.CreatePagosTitle_saldo}" required="true" requiredMessage="#{bundle.CreatePagosRequiredMessage_saldo}"/>
                    <h:outputLabel value="#{bundle.CreatePagosLabel_idCredito}" for="idCredito" />
                    <h:selectOneMenu id="idCredito" value="#{pagosController.selected.idCredito}" title="#{bundle.CreatePagosTitle_idCredito}" required="true" requiredMessage="#{bundle.CreatePagosRequiredMessage_idCredito}">
                        <f:selectItems value="#{creditosController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{pagosController.create}" value="#{bundle.CreatePagosSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{pagosController.prepareList}" value="#{bundle.CreatePagosShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreatePagosIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
